ifeq ($(CC),xlc_r)
#AIX_ARCH_FLAGS=-q64 -qarch=auto -qtune=auto -qcache=auto 
AIX_ARCH_FLAGS=-q64 -qarch=pwr5 -qtune=pwr5 
AIX_CFLAGS=-qsmp=omp -qkeyword=restrict
AIX_CXX_COMMON_FLAGS=-qnoeh -qsuppress=1540-1090:1540-0700:1540-1088:1540-1087
#AIX_OPT_FLAGS= -Q -qmaxmem=-1 
AIX_OPT_FLAGS=-O3 -Q -qmaxmem=-1 -qipa=inline -qinline -qlargepage -qprefetch -qstrict -qhot

CXXFLAGS=$(AIX_ARCH_FLAGS) $(AIX_CFLAGS) $(AIX_CXX_COMMON_FLAGS) $(AIX_OPT_FLAGS) 
CFLAGS=$(AIX_ARCH_FLAGS) $(AIX_CFLAGS) $(AIX_OPT_FLAGS) 
FFLAGS=$(AIX_ARCH_FLAGS) $(AIX_OPT_FLAGS)
#LDFLAGS= -qstaticlink
endif

ifeq ($(CC),icc)
ICC_COMMON_FLAGS=-restrict -unroll -fno-alias -O3 -ip -openmp -xT
CFLAGS= $(ICC_COMMON_FLAGS)
CXXFLAGS= $(ICC_COMMON_FLAGS) 
FFLAGS=-O3 -unroll -xT
DEFS += -DADD_
endif

ifeq ($(CC),gcc)
GNU_COMMON_FLAGS=-O6 -Drestrict=__restrict__ -fstrict-aliasing -funroll-all-loops   -finline-limit=1000 -fopenmp
CFLAGS= $(GNU_COMMON_FLAGS)
CXXFLAGS= $(GNU_COMMON_FLAGS) -ftemplate-depth-60
FFLAGS=-O3 -fstrict-aliasing -funroll-all-loops  
DEFS += -DADD_
endif
